<?php 
$nav= 'Dash board';

?>
<center>
<div style="clear:both;height:10px;">&nbsp;</div>
<fieldset style="width:80%">
    <legend><?php echo $nav;?></legend>
    <div>
    
    <div style="float:right">
      <form action="#" method="post" name="filterForm" id="filterForm">
        <table >
       
          <tr>
            <td align="right">             
              <input name="filter_text" size="10" value="<?php echo $this->Session->read('Home.filterText') ?>" />
              &nbsp;&nbsp;&nbsp;&nbsp;<?php _resource('filter by') ?>:&nbsp;&nbsp;&nbsp;&nbsp;
              <select name="filter_field" id="filter_state" class="inputbox" size="1" >
                <?php 
					foreach($filterField as $k=>$v){
						$select="";
						
						if($k==$this->Session->read('Home.filterField')){							
							$select='selected="selected"';
						}
						echo '<option value="'.$k.'" '.$select.'>'.$v.'</option>';
					}?>
              </select>
              &nbsp;&nbsp;&nbsp;&nbsp;
              <input type="button" value="<?php _resource('search') ?>" onclick="ajax('listContent','<?php echo $this->params['controller'].'/filter';?>','filterForm');">
            </td>
          </tr>
          
          <tr>
            <td align="right">Status: &nbsp;      
            	<?php echo $this->Form->input($uses[0].'.status_id', array('type'=>'select','options'=>$statuses,'default'=>intval($this->Session->read('Home.status_id')),'empty'=>'all',"class"=>"inputbox","label"=>"","div"=>"","error"=>"",'onchange'=>'ajax("listContent","'.$this->params['controller'].'/status/" + this.value,"filterForm")'));?>       
				
            </td>
          </tr>
        </table>
      </form>
    </div>
    <div class="clear"></div>         
    </div> 
       
    <div id="listContent">
    	<script>
    		ajax('listContent','<?php echo $this->params['controller'] ?>/lists');
    	</script>
    </div>    
</fieldset>
<a id="addContentZone" href="javascript:;"></a>

<div id="addContent" style="width:900px;"></div>
</center>
